<?php
require Yii::app()->basePath.'/modules/manage/util/MenuList.php';
?>
<div id="menu">
    <h6 class="selected">
        <a><span>优化推广</span></a>
    </h6>
    <ul class="opened">
        <?php
        $menuleft = $MenuList[4]['child'];
        $operpermissionarray = unserialize($user['admingrouppermission']['operpermissionarray']);
        if($user['user']['loginname'] == 'administrator'){
            foreach($menuleft as $m){
                    ?>
                    <li><a href="<?php echo $m['url']; ?>"><?php echo $m['name']; ?></a></li>
                <?php
            }
        }else{
            foreach($menuleft as $m){
                if(array_key_exists($m['enkey'],$operpermissionarray)){
                    ?>
                    <li><a href="<?php echo $m['url']; ?>"><?php echo $m['name']; ?></a></li>
                <?php
                }
            }
        }

        ?>
    </ul>
</div>
